﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace SlidePhoto
{
    public partial class OpenScreenViewer : Form
    {
        public OpenScreenViewer()
        {
            InitializeComponent();
            openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            openFileDialog.Filter = "SlidePhoto slide show (*.spss)|*.spss";
            openFileDialog.FilterIndex = 1;
        }

        private void selectShowButton_Click(object sender, EventArgs e)
        {
            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                new WelcomeScreenViewer(Cryptography.Decrypt(File.ReadAllText(openFileDialog.FileName), "1a2523da8bfb4aa49586449b36ed3a14")).Show();
                this.Close();
            }
        }
    }
}
